package com.lxw.library.views;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;

import com.lxw.library.R;


/**
 * 作者：李学伟
 * 日期：2018/8/9
 * 用途：
 */

public class LxwTextView extends LxwBaseView {
    public LxwTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public LxwTextView(Context context, int orientation, ColumnRequestListener requestListener) {
        super(context, orientation, requestListener);
    }

    public LxwTextView(Context context, ColumnRequestListener requestListener) {
        super(context, 0, requestListener);
    }

    public int getHorizontalView() {
        return R.layout.lxwtextview_h;
    }

    public int getVerticalView() {
        return R.layout.lxwtextview_v;
    }

    @Override
    public String getValue() {
        if (null != valueTv) {
            return (valueTv.getText().toString());
        }else{
            return "";
        }
    }
    @Override
    public boolean checkValueIsLegal() {
        return isMust && !TextUtils.isEmpty(getValue());
    }
}
